-- GENERATED SPELL FOR [Goblin Engineer] --


function spell0_622(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_622', 625, 1)
end

function spell1_622(pUnit, Event) --@Summon Remote-Controlled Golem,Self--
pUnit:FullCastSpellOnTarget(3605,pUnit)
pUnit:RegisterEvent('Sorts_622', 3000, 1)
end

function Sorts_622(pUnit, Event)
local choix_sorts_622 = math.random(0, 1)
if choix_sorts_622 == 0 then
pUnit:RegisterEvent('spell0_622', 1, 1)
end
if choix_sorts_622 == 1 then
pUnit:RegisterEvent('spell1_622', 1, 1)
end
end

function mob622_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_622', math.random(1500, 3000), 1)
end

function mob622_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob622_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob622_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(622, 1, 'mob622_Action')
RegisterUnitEvent(622, 2, 'mob622_Leave')
RegisterUnitEvent(622, 3, 'mob622_Kill')
RegisterUnitEvent(622, 4, 'mob622_Die')
